<template>
  <div class="listItem">
      <img @click="gotodis(item.id)" class="imgs" :src="item.pic" >
      <p class="title">{{item.name}}</p>
      <p class="cname">{{item.characteristic}}</p>
      <p ><span class="price">￥{{item.minPrice}}</span></p>
  </div>
</template>

<script>
export default {
    props:{
     item:{
         type:Object
     }
    },
    methods:{
        gotodis(id){
            // this.$router.push({
            //     path:"/details",
            //     query:{
            //         id
            //     }
            // })
        }
    }

}
</script>

<style scoped>
.listItem{
    width: 100%;
    height: 5rem;
    box-sizing: border-box;
    padding: 0.1rem;
}
.imgs{
    width: 100%;
    height: 70%;
}
.title{
    width: 100%;
    height: 0.5rem;
    line-height: 0.5rem;
     display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    font-size: 0.3rem;
}
.cname{
    width: 100%;
    height: 0.5rem;
    line-height: 0.5rem;
     display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    font-size: 0.3rem;
    color: gray;
}
.price{
    font-size: 0.3rem;
    color: red;
}

</style>